package com.jdbc;

import com.jdbc.dao.UserDao;
import com.jdbc.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringApplication {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext-jdbc.xml");
        UserDao userDao = context.getBean("userDao", UserDao.class);
        User user = userDao.selectById(1);
        System.out.println(user);
    }
}
